package com.huangtang.pc.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author sunjf
 * @date 2024/01/05
 */
@Getter
@AllArgsConstructor
public enum BaseEnum implements IEnum{
    SUCCESS(200, "成功"),
    PARAMETER_ERROR(400, "参数错误"),
    UNAUTHORIZED(401, "未授权"),
    FORBIDDEN(403, "禁止访问"),
    NOT_FOUND(404, "资源不存在"),
    INTERNAL_SERVER_ERROR(500, "服务器内部错误"),
    BAD_REQUEST(400, "请求错误"),
    UNAUTHORIZED_ERROR(401, "未授权");

    private final Integer code;

    private final String msg;


    @Override
    public Integer getLabel() {
        return code;
    }

    @Override
    public Object getValue() {
        return msg;
    }
}
